package com.jackrain.nea.fc.pos.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

/**
 * @author wuwenxue
 * @date 2018/05/26
 **/
@Mapper
public interface ViewDLRetailStoBillMapper {

    @Select("SELECT A.ID AS ID,A.CP_C_STORE_ID AS CP_C_STORE_ID" +
            " FROM DL_B_STORE_BILL A " +
            "WHERE A.CP_C_STORE_ID = #{storeID} AND A.BILL_DATE = #{billDate}")
    List<HashMap> selStotoBill(@Param("storeID") Long storeID, @Param("billDate") Date billDate);


    @Select("SELECT B.ID AS ITEMID,B.BILL_NO AS ITEM_BILL_NO,B.CASHIERNUMBER AS CASHIERNUMBER" +
            " FROM DL_B_STORE_BILL_ITEM B " +
            "WHERE B.DL_B_STORE_BILL_ID=#{id}")
    List<HashMap> selStotoBillItem(@Param("id") Long id);

}
